﻿#region Using

using System;
using WSMon.Core.Configuration;
using WSMon.Core.Helpers;
using WSMon.Engine;
using WSMon.Engine.Proxy;

#endregion

namespace ConsoleApplication1
{
    internal class Program
    {
        private static void Main(string[] args)
        {
            #region Tests

            // Configurasyon bilgilerini oku
            Core.Configuration =
                (Configuration)XmlFactory.ReadFromXml("..\\..\\Configuration.xml", typeof(Configuration));

            // Check complated
            Core.CheckOutComplated += Core_CheckOutComplated;

            // All checks complated
            Core.ThreadPooler.ThreadsFinished +=
                ThreadPooler_ThreadsFinished;

            Core.RunAllChecks();

            #endregion
        }

        private static void ThreadPooler_ThreadsFinished()
        {
            Console.WriteLine("\n***\tAll checks complated\t***\n");
        }

        private static void Core_CheckOutComplated(CheckerProxy checkerProxy, bool returnValue)
        {
            Console.WriteLine("{3} : {0} returns {1}. {2}",
                              checkerProxy.Checker.GetType().Name,
                              returnValue,
                              checkerProxy.Checker.GetLogs(),
                              checkerProxy.Hosting.HostingID
                );
        }

        #region TmpRenk

        #endregion
    }
}